package com.mcp.server.enums;

import java.util.HashMap;
import java.util.Map;

public enum DirectionLiteType {
    TRANSIT("transit", "公交"),
    DRIVING("driving", "驾车"),
    WALKING("walking", "步行"),
    RIDING("riding", "骑行");
    private final String type;
    private final String description;
    private static final Map<String, DirectionLiteType> hashMap = new HashMap<>();
    static {
        DirectionLiteType[] values = DirectionLiteType.values();
        for (DirectionLiteType value : values) {
            hashMap.put(value.getType(), value);
        }
    }
    DirectionLiteType(String type, String description) {
        this.type = type;
        this.description = description;
    }
    public String getType() {
        return type;
    }
    public String getDescription() {
        return description;
    }
    public static DirectionLiteType getDirectionLiteType(String type) {
        return hashMap.get(type);
    }
}
